<template>
	<view>
		<view class="adtitle" v-if="!advert.isFullScreen">{{ advert.AdTitle }}</view>
		<view class="admemo" v-html="advert.AdMemo" :style="{padding:(advert.isFullScreen?'0rpx':'20rpx')}"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				adid: 0,
				advert: {}
			};
		},
		onLoad(option) {
			console.log(option)
			this.adid = option.adid
			
			this.getAdvert()
		},
		methods: {
			getAdvert() {
				this.$httpost('/Home/AdDetails', {
					adid: this.adid
				}).then(res => {
					console.log('接口返回数据：', res);
					if (res.code == 200) {
						this.advert = res.data
						uni.setNavigationBarTitle({
							title: res.data.AdName
						})
					}
				})
				
			},
		}
	}
</script>

<style lang="scss">
.adtitle {
	padding:30rpx;
	text-align: center;
	font-size:40rpx;
	font-weight: 500;
	color: #606060;
	line-height: 60rpx;
}
.admemo {
	padding:20rpx;
	font-size:26rpx;
	line-height:50rpx;
	font-weight:400;
	color:#606060;
}
.admemo p img {
		width:100%
	}
</style>
